﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;

public partial class Payment : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            txtfactura.Text = Request.Params["NoFactura"].ToString();
            txtnombre.Text = Request.Params["usrNombre"].ToString();
            txtdocumento.Text = Request.Params["Nit"].ToString();
            txtvalor.Text = Request.Params["Valor"].ToString();
            txtIva.Text = Request.Params["Iva"].ToString();
            txtSubtotal.Text = Request.Params["Subtotal"].ToString();
          
        }
    }

    public string GetMd5Hash(string input)
    {
        // Create a new instance of the MD5CryptoServiceProvider object.
        System.Security.Cryptography.MD5 md5Hasher = System.Security.Cryptography.MD5.Create();
        // Convert the input string to a byte array and compute the hash.
        byte[] data = md5Hasher.ComputeHash(Encoding.Default.GetBytes(input));
        // Create a new Stringbuilder to collect the bytes and create a string.
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < data.Length; i++)
        {
            sb.Append(data[i].ToString("x2"));
        }
        return sb.ToString();
    }
}
